package org.bright;

import org.bright.dao.Impl.UserMySqlDaoImpl;
import org.bright.dao.UserDao;
import org.bright.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args ) {
//        UserDao userDao = new UserMySqlDaoImpl();
//        userDao.sayHello();
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
//        UserDao userDao = (UserDao) context.getBean("userOracleDao");
//        userDao.sayHello();
//        System.out.println( "Hello World!" );

        UserService userService = context.getBean(UserService.class);
        userService.sayHello();
    }
}
